require_relative '../lib/csdn_project'

CSDNConfig::CSDNProject.new('csdn-das') do |jobs|
	jobs.all.repo_name = 'csdn-das'
	jobs.all.repo_group = 'CSDN_DA'
	jobs.all.add_notification 'dtm'
	jobs.all.add_permission 'zhengwx', :all
	
	jobs.continuous.command = CSDNConfig::Command.new do |cmd|
		cmd.standard_build_setup
		cmd.jdk7_setup
		cmd.save_build_number '$WORKSPACE/jenkins_build.txt'
		cmd.clean_build_directory 'target'
		cmd.make
		cmd.puts
	end
	
	jobs.release.command = CSDNConfig::Command.new do |cmd|
		cmd.standard_build_setup
		cmd.jdk7_setup
		cmd.checkout_tag '$WORKSPACE/src', '$WORKSPACE/jenkins_build.txt'
		cmd.clean_build_directory 'target'
		cmd.package
		cmd.puts
	end
	jobs.release.post_build << CSDNConfig::PostBuild::Artifacts.new('$WORKSPACE/src/components/net.csdn.das.components.server.backend/target/datasee.war')
	
end